package com.easypan.Service;


import com.easypan.entity.dto.SessionwebUserDto;
import com.easypan.entity.po.FileShare;
import com.easypan.entity.query.FileShareQuery;
import com.easypan.entity.vo.PaginationResultVO;
import com.easypan.entity.vo.R;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * 分享信息 业务接口
 */
public interface FileShareService {

    /**
     * 根据条件查询列表
     */
    List<FileShare> findListByParam(FileShareQuery param);

    /**
     * 根据条件查询列表
     */
    Integer findCountByParam(FileShareQuery param);

    /**
     * 分页查询
     */
    PaginationResultVO<FileShare> findListByPage(FileShareQuery param);

    /**
     * 新增
     */
    Integer add(FileShare bean);

    /**
     * 批量新增
     */
    Integer addBatch(List<FileShare> listBean);

    /**
     * 批量新增/修改
     */
    Integer addOrUpdateBatch(List<FileShare> listBean);

    /**
     * 根据ShareId查询对象
     */
    FileShare getFileShareByShareId(String shareId);


    /**
     * 根据ShareId修改
     */
    Integer updateFileShareByShareId(FileShare bean, String shareId);


    /**
     * 根据ShareId删除
     */
    Integer deleteFileShareByShareId(String shareId);


    R shareFile(SessionwebUserDto sessionwebUserDto, String fileId, Integer validType, String code);

    R cancelShare(SessionwebUserDto sessionwebUserDto, String shareIds);

    R getShareLoginInfo(HttpSession session,String shareId);

    R getShareInfo(String shareId, HttpSession session);

    R checkShareCode(String shareId, HttpSession session, String code);

    R loadFileList(String shareId, HttpSession session, String filePid);

    R getFolderInfo(String shareId, HttpSession session, String path);
}